#pragma once

#include <rviz_common/visibility_control.hpp>
#include <QColor>
#include <QVector3D>
#include <QObject>
#include <visualization_msgs/msg/interactive_marker.hpp>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <QColor>
#include "rviz_custom_plugins/models/pose.h"
#include <geometry_msgs/msg/point.hpp>
#include "rviz_custom_plugins/models/point_normal.h"


using visualization_msgs::msg::InteractiveMarker;
using rviz_custom_plugins::models::Pose;
using rviz_custom_plugins::models::PointNormal;


namespace rviz_custom_plugins
{

namespace utils
{


class InteractiveMarkerFactory: public QObject
{
    Q_OBJECT

public:
    static InteractiveMarker createWaypoint(Pose pose);

    static InteractiveMarker createFlyzonePoint(QColor color, geometry_msgs::msg::Point position);

    static InteractiveMarker createPcdPoint(PointNormal point);

    static InteractiveMarker createPolygon(std::string name, QColor markerColor, std::list<InteractiveMarker>& pointMarkers);

    static InteractiveMarker createCube(std::string name, QColor markerColor, std::list<InteractiveMarker>& pointMarkers);

    static InteractiveMarker createPrism(std::string name, std::list<InteractiveMarker>& pointMarkers);

private:
    static int incrMarkerId;

    static std::string generateIntMarkerName(std::string markerType);

};


}


}
